home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Georgia Wildfire Prevention
/
Georgia Wildfire Prevention.iso
/
pc
/
media
/
dirs
/
BackUp
/
code.cst
/
00014_Script_video cues
< prev
next >
Wrap
Text File
|
2002-10-15
|
2KB
|
79 lines
property events,times,vidsprite,next_time,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,list_source,snd
on getpropertydescriptionlist me
plist=[#snd:[#comment:"Video spritenum",#format:#integer,#default:""],\
#list_source:[#comment:"Time list (if used)",#format:#string,#default:""],\
#a1:[#comment:"TIME@ACTION",#format:#string,#default:""],\
#a2:[#comment:"TIME@ACTION",#format:#string,#default:""],\
#a3:[#comment:"TIME@ACTION",#format:#string,#default:""],\
#a4:[#comment:"TIME@ACTION",#format:#string,#default:""],\
#a5:[#comment:"TIME@ACTION",#format:#string,#default:""],\
#a6:[#comment:"TIME@ACTION",#format:#string,#default:""],\
#a7:[#comment:"TIME@ACTION",#format:#string,#default:""],\
#a8:[#comment:"TIME@ACTION",#format:#string,#default:""],\
#a9:[#comment:"TIME@ACTION",#format:#string,#default:""],\
#a10:[#comment:"TIME@ACTION",#format:#string,#default:""],\
#a11:[#comment:"TIME@ACTION",#format:#string,#default:""],\
#a12:[#comment:"TIME@ACTION",#format:#string,#default:""],\
#a13:[#comment:"TIME@ACTION",#format:#string,#default:""],\
#a14:[#comment:"TIME@ACTION",#format:#string,#default:""],\
#a15:[#comment:"TIME@ACTION",#format:#string,#default:""]]
return plist
end
on beginsprite me
times=[]
events=[]
vidsprite=sprite(snd)
oid=the itemdelimiter
the itemdelimiter="@"
if list_source<>"" and list_source<>Void then
parse_list(me)
else
repeat with i=1 to 15
grp=symbol("a"&string(i))
str=me[grp]
if str<>Void then
n_time=str.item[1]
n_action=str.item[2]
times.add(n_time)
events.add(n_action)
end if
end repeat
end if
the itemdelimiter=oid
next_time=times[1]
vidsprite.movierate=1
end
on exitframe me
if vidsprite.movietime>=next_time then
act=events[1]
do(act)
deleteat(events,1)
deleteat(times,1)
if times.count>0 then
next_time=times[1]
else
next_time=999999999999999
end if
end if
go the frame
end
on parse_list me
str=member(list_source).text
nl=member(list_source).linecount
repeat with i=1 to nl
ntry=str.line[i]
if ntry.length>3 then
tim=value(ntry.item[1])
act=ntry.item[2]
times.add(tim)
events.add(act)
end if
end repeat
end